package com.xzh.springCloud.service;

import com.xzh.springCloud.entity.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @Author: zhiHong
 * @CreateTime: 2023-09-01 11:25
 * @Description:
 */
@FeignClient(value = "seata-storage-micro-service-10010")
public interface StorageService {
    // 这里一定要和 account 微服务模块保持一致，都使用 @RequestParam
    @PostMapping("/storage/reduce")
    public Result reduce(@RequestParam("productId") Long productId, @RequestParam("amount") Integer amount);
}
